/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.view;

import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

/**
 *
 * @author Litha
 */
public class PanelTambahPinjaman extends JPanel {
    private JLabel labelKodeAnggota;
    private JTextField textKodeAnggota;
    private JLabel labelKodeKoleksi;
    private JTextField textKodeKoleksi;
    private JButton tombolSimpan;
    private JButton tombolBatal;
    
     public PanelTambahPinjaman() {
     this.setLayout(null);
     this.setSize(600, 700);
                
    JLabel lab2 = new JLabel("TAMBAH PINJAMAN :");
        lab2.setBounds(100,30,200,20);
        this.add(lab2);
        
        
        //label KodeAnggota
       
        labelKodeAnggota = new JLabel ("Kode Anggota");
        labelKodeAnggota.setBounds(65, 85, 90, 20);
        this.add(labelKodeAnggota);
        
        textKodeAnggota = new JTextField ("");
        textKodeAnggota.setBounds(200, 85, 150, 20);
        this.add(textKodeAnggota);
        
         //label KodeKoleksi
        
        labelKodeKoleksi = new JLabel ("Kode Koleksi");
        labelKodeKoleksi.setBounds(65 ,120 , 90 , 20);
        this.add(labelKodeKoleksi);
        
        textKodeKoleksi = new JTextField ("");
        textKodeKoleksi.setBounds(200, 120, 150, 20);
        this.add(textKodeKoleksi);
        
        //tombol simpan & batal
        
        tombolSimpan = new JButton ("Simpan");
        tombolSimpan.setBounds(100 , 260 , 80 , 20);
        this.add(tombolSimpan);
        tombolSimpan.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                tombolSimpanAction();
                
               
            }

             private void tombolSimpanAction() {
                 
             }

             

            
        }
                );
        tombolBatal = new JButton ("Batal");
        tombolBatal.setBounds(250 , 260 , 80 , 20);
        this.add(tombolBatal);
        
    
}
public static void main(String[] args) {
       JDialog f = new JDialog();
        //JFrame f = new JFrame();
  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        f.setLayout(new FlowLayout());
        f.setSize(500, 400);
        f.getContentPane().add(new PanelTambahPinjaman());
        f.setVisible(true);


}
}